package com.nbgroup.dao;

import com.nbgroup.entity.LiteratureChild;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface LiteratureChildRepositoty extends JpaRepository<LiteratureChild,Integer>, JpaSpecificationExecutor<LiteratureChild> {
    @Query("select lc from LiteratureChild lc where lc.literatureId = :literId and lc.sts = 1")
    List<LiteratureChild> findLiteratureChildById(@Param("literId") Integer literId);
}
